﻿<%@ Page Title="" Language="VB" MasterPageFile="~/KYC/MasterPagePopup.master" AutoEventWireup="false"
    CodeFile="NonIndividualCorp.aspx.vb" Inherits="KYC_NonIndividualCorp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../Scripts/JScript.js" type="text/javascript"></script>
    <script type="text/javascript">

        var hasSubmitted = 0;
        function NoDoubleSubmit() {
            var divMsg = document.getElementById('Processing');
            if (hasSubmitted == 0) {
                hasSubmitted = 0;
                divMsg.style.display = 'block';
                return true;
            }
            return false;
        }

        function NoDoubleSave() {
            var divMsg = document.getElementById('Saving');
            if (hasSubmitted == 0) {
                hasSubmitted = 0;
                divMsg.style.display = 'block';
                return true;
            }
            return false;
        }

        function setParam_SEARCH_A() {
            $("input[id$=hdfCID]").val($("input[id$=txtUNIQUEID_A]").val());
            $("input[id$=hdfNameTH1]").val($("input[id$=txtINDV_FIRST_NAME_A]").val());
            $("input[id$=hdfNameTH3]").val($("input[id$=txtINDV_LAST_NAME_A]").val());           

            return true;
        }

        function setParam_SEARCH_S() {
            $("input[id$=hdfCID]").val($("input[id$=txtUNIQUEID_S]").val());
            $("input[id$=hdfNameTH1]").val($("input[id$=txtINDV_FIRST_NAME_S]").val());
            $("input[id$=hdfNameTH3]").val($("input[id$=txtINDV_LAST_NAME_S]").val());

            return true;
        }

        function setParam_SEARCH_D() {
            $("input[id$=hdfCID]").val($("input[id$=txtUNIQUEID_D]").val());
            $("input[id$=hdfNameTH1]").val($("input[id$=txtINDV_FIRST_NAME_D]").val());
            $("input[id$=hdfNameTH3]").val($("input[id$=txtINDV_LAST_NAME_D]").val());

            return true;
        }

        function setParam_SEARCH_F() {
            $("input[id$=hdfCID]").val($("input[id$=txtUNIQUEID_F]").val());
            $("input[id$=hdfNameTH1]").val($("input[id$=txtINDV_FIRST_NAME_F]").val());
            $("input[id$=hdfNameTH3]").val($("input[id$=txtINDV_LAST_NAME_F]").val());

            return true;
        }

        function setParam_SEARCH_H() {
            $("input[id$=hdfCID]").val($("input[id$=txtUNIQUEID_H]").val());
            $("input[id$=hdfNameTH1]").val($("input[id$=txtINDV_FIRST_NAME_H]").val());
            $("input[id$=hdfNameTH3]").val($("input[id$=txtINDV_LAST_NAME_H]").val());

            return true;
        }

        // Created by Ball on Nov 07, 2014 11.00 am
        function popAMListWindow() {
            var strUniquedId = $("input[id$=hdfCID]").val();
            var strPassportId = $("input[id$=hdfPassport]").val();
            var strNameTh1 = $("input[id$=hdfNameTH1]").val().replace("&", "|");
            var strNameTh2 = $("input[id$=hdfNameTH2]").val().replace("&", "|");
            var strNameTh3 = $("input[id$=hdfNameTH3]").val().replace("&", "|");
            var strNameEn1 = $("input[id$=hdfNameEN1]").val().replace("&", "|");
            var strNameEn2 = $("input[id$=hdfNameEN2]").val().replace("&", "|");
            var strNameEn3 = $("input[id$=hdfNameEN3]").val().replace("&", "|");

            var allString = $("input[id$=hdfCID]").val() +
                            $("input[id$=hdfPassport]").val() +
                            $("input[id$=hdfNameTH1]").val() +
                            $("input[id$=hdfNameTH2]").val() +
                            $("input[id$=hdfNameTH3]").val() +
                            $("input[id$=hdfNameEN1]").val() +
                            $("input[id$=hdfNameEN2]").val() +
                            $("input[id$=hdfNameEN3]").val()

            var isValid = true;
            if (allString.toString() == "") {
                isValid = false;
            }

            var returnvalue = null;

            if (isValid) {
                returnvalue = window.showModalDialog('AMLList.aspx?uniqueID=' + strUniquedId
                + '&passportID=' + strPassportId
                + '&NameTh1=' + strNameTh1
                + '&NameTh2=' + strNameTh2
                + '&NameTh3=' + strNameTh3
                + '&NameEn1=' + strNameEn1
                + '&NameEn2=' + strNameEn2
                + '&NameEn3=' + strNameEn3

                , null, 'status:no; dialogWidth:1000px; dialogHeight:600px; help:no; scroll:yes; menubar:no; resizable:no');
            }
            else {
                alert("กรุณาป้อนเลขที่บัตรประชาชนหรือชื่อ-นามสกุล สำหรับการตรวจกรองรายชื่อ");
            }

            if (returnvalue != null) {
                var values = returnvalue.split(";");  // return กลับมาหลายค่าแบ่งด้วย ";"
                document.getElementById("<%=hdfLevel.ClientID%>").value = values[0];
            }
        }
        // Created by Ball on Nov 07, 2014 11.00 am

        function NumberOnly(e) {

            if ((e.keyCode >= 48 && e.keyCode <= 57) || (e.keyCode == 8)) {
                return true;
            }
            else {
                return false;
            }
        }

        /*showModalDialog Return*/
        function Close() {
            window.close();
        }
    
    </script>

    <style type="text/css">
        .style3
        {
            width: 20%;
            height: 25px;
        }
        .style4
        {
            width: 30%;
            height: 25px;
        }
        .style5
        {
            width: 20%;
            height: 24px;
        }
        .style6
        {
            width: 60%;
            height: 24px;
        }
    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel3" runat="server">
        <ContentTemplate>
            <asp:HiddenField ID="hdfNameTH1" runat="server" Value="" />
            <asp:HiddenField ID="hdfNameTH2" runat="server" Value="" />
            <asp:HiddenField ID="hdfNameTH3" runat="server" Value="" />
            <asp:HiddenField ID="hdfNameEN1" runat="server" Value="" />
            <asp:HiddenField ID="hdfNameEN2" runat="server" Value="" />
            <asp:HiddenField ID="hdfNameEN3" runat="server" Value="" />
            <asp:HiddenField ID="hdfCID" runat="server" Value="" />
            <asp:HiddenField ID="hdfPassport" runat="server" Value="" />
            <asp:HiddenField ID="hdfLevel" runat="server" Value="" />

            <table style="padding: 5px; width: 100%;" class="control" border="0" cellpadding="0"
                cellspacing="0">
                <tr bgcolor="#FF9933">
                    <td colspan="5" style="text-align: center">
                        <strong>แบบกรอกข้อมูลโครงสร้งการบริหารจัดการหรือการเป็นเจ้าของ</strong>
                    </td>
                </tr>
                <tr bgcolor="#FDF6DA">
                    <td style="padding: 5px; width: 5%;" align="right">
                        &nbsp;
                    </td>
                    <td align="right" style="padding: 5px; width: 20%;">
                        เลขทะเบียนนิติบุคคล
                    </td>
                    <td align="left" style="padding: 5px; width: 40%;">
                        <asp:TextBox ID="txtCORP_ID" runat="server" CssClass="control" Height="20px" MaxLength="20"
                            Width="60%" ReadOnly="true" Enabled="False"></asp:TextBox>
                    </td>
                    <td align="right" style="padding: 5px; width: 15%;">
                        ลำดับขั้น
                    </td>
                    <td align="left" style="padding: 5px; width: 20%;">
                        <asp:TextBox ID="txtCORP_LEVEL" runat="server" CssClass="control" Height="20px" 
                            ReadOnly="true" Enabled="False" Width="51px"></asp:TextBox>
                        <asp:TextBox ID="txtCORP_LEVEL_OLD" runat="server" CssClass="control" 
                            Enabled="False" Height="20px" ReadOnly="true" Width="51px"></asp:TextBox>
                    </td>
                </tr>
                <tr bgcolor="#FDF6DA">
                    <td style="padding: 5px; width: 5%;" align="right">
                        &nbsp;
                    </td>
                    <td align="right" style="padding: 5px; width: 20%;">
                        ชื่อนิติบุคคล
                    </td>
                    <td align="left" style="padding: 5px; width: 40%;">
                        <asp:TextBox ID="txtCORP_NAME" runat="server" CssClass="control" Height="20px" MaxLength="20"
                            Width="60%" ReadOnly="true" Enabled="False"></asp:TextBox>
                    </td>
                    <td align="right" style="padding: 5px; width: 15%;">
                        ลำดับที่
                    </td>
                    <td align="left" style="padding: 5px; width: 20%;">
                        <asp:TextBox ID="txtCORP_SEQ" runat="server" CssClass="control" Height="20px" 
                            ReadOnly="true" Enabled="False" Width="51px"></asp:TextBox>
                        <asp:TextBox ID="txtCORP_SEQ_OLD" runat="server" CssClass="control" 
                            Enabled="False" Height="20px" ReadOnly="true" Width="51px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="padding: 5px; width: 5%;" align="right">
                        &nbsp;
                    </td>
                    <td align="right" style="padding: 5px; width: 20%;">
                        เลขทะเบียนนิติบุคคลที่เป็นเจ้าของ
                    </td>
                    <td align="left" style="padding: 5px; width: 40%;">
                        <asp:TextBox ID="txtOWNER_CORP_ID" runat="server" CssClass="control" 
                            Height="20px" MaxLength="20"
                            Width="60%" ReadOnly="true" Enabled="False"></asp:TextBox>
                    </td>
                    <td colspan="2">
                    </td>
                </tr>
                <tr>
                    <td style="padding: 5px; width: 5%;" align="right">
                        &nbsp;
                    </td>
                    <td align="right" style="padding: 5px; width: 20%;">
                        ชื่อนิติบุคคลที่เป็นเจ้าของ
                    </td>
                    <td align="left" style="padding: 5px; width: 40%;">
                        <asp:TextBox ID="txtOWNER_CORP_NAME" runat="server" CssClass="control" 
                            Height="20px" MaxLength="20"
                            Width="60%" ReadOnly="true" Enabled="False"></asp:TextBox>
                    </td>
                    <td colspan="2">
                    </td>
                </tr>
                <tr bgcolor="#FF9933">
                    <td colspan="5" style="text-align: left">
                        &nbsp;<asp:Label ID="lblGroupCodeName_1" runat="server" Text="รายชื่อเจ้าของ"></asp:Label>
                    </td>
                </tr>
                <tr bgcolor="#FDF6DA">
                    <td style="padding: 5px; width: 5%;" align="center" valign="middle">
                        <asp:Label ID="lblGroupCode_1" runat="server" Text="1"></asp:Label>
                    </td>
                    <td align="left" style="padding: 5px; width: 95%;" colspan="4">
                        <table width="100%">
                            <tr>
                                <td style="background-color: #FF9933; border: 0px; padding: 0px;" colspan="5">
                                    &nbsp;<asp:Label ID="lblGroupCodeSubName_11" runat="server" Text="รายชื่อเจ้าของ"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: center; width: 5%;" rowspan="7">
                                    <asp:Label ID="lblGroupCodeSub_11" runat="server" Text="1"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    คำนำหน้าชื่อ</td>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 60%;" colspan="2">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    <asp:DropDownList ID="ddlPrefixTH_A" runat="server" AutoPostBack="true" 
                                        CssClass="control" Width="150px">
                                    </asp:DropDownList>
                                </td>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" colspan="2" style="width: 60%;">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    ชื่อ
                                </td>
                                <td align="left" style="width: 20%;">
                                    นามสกุล
                                </td>
                                <td align="left" colspan="2" style="width: 60%;">
                                    เลขที่บัตรประชาชน
                                </td>
                            </tr>
                            <tr>
                                <td align="left" class="style3">
                                    <asp:TextBox ID="txtINDV_FIRST_NAME_A" runat="server" CssClass="control" 
                                        Height="20px" MaxLength="20" Width="150px"></asp:TextBox>
                                    </td>
                                <td align="left" class="style3">
                                    <asp:TextBox ID="txtINDV_LAST_NAME_A" runat="server" CssClass="control" 
                                        Height="20px" MaxLength="20" Width="150px"></asp:TextBox>
                                </td>
                                <td align="left" class="style4">
                                    <asp:TextBox ID="txtUNIQUEID_A" runat="server" CssClass="control" Height="20px" 
                                        MaxLength="13" onkeypress="javascript:return NumberOnly(event);" Width="150px"></asp:TextBox>
                                </td>
                                <td align="left" class="style4">
                                    <asp:Button ID="btnSancList_A" runat="server" Text="ตรวจกรอง" />
                                    <asp:Button ID="btnEditA" runat="server" Text="แก้ไข" Visible="false" 
                                        Width="50px" />
                                    <asp:Button ID="btnAddA" runat="server" Text="เพิ่ม" Width="50px" />
                                    <asp:Button ID="btnDelA" runat="server" Text="ลบ" Width="50px" />
                                    </td>
                            </tr>
                            <tr>
                                <td align="left" class="style3">
                                </td>
                                <td align="left" class="style3">
                                    <asp:Label ID="lblSanc_Result_A" runat="server" ForeColor="Red"></asp:Label>
                                </td>
                                <td align="left" class="style4">
                                    <asp:Label ID="lblRisk_Level_A" runat="server" ForeColor="Red"></asp:Label>
                                </td>
                                <td align="left" class="style4">
                                    <asp:HiddenField ID="hidIndexA" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" colspan="4">
                                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                        ForeColor="#333333" ShowHeaderWhenEmpty="True" Width="95%">
                                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                        <Columns>
                                            <asp:CommandField ButtonType="Image" SelectImageUrl="~/img/icon/select_icon.gif"
                                                ShowSelectButton="True">
                                                <ItemStyle HorizontalAlign="Center" Width="60px" />
                                            </asp:CommandField>
                                            <asp:TemplateField HeaderText="ลำดับ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_Seq" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                                <ItemStyle HorizontalAlign="Center" Width="5%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="รหัส" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_THPREFIX_A" runat="server" Text='<%# Bind("THPREFIX") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" />
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="คำนำหน้าชื่อ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_THPREFIX_DESC_A" runat="server" Text='<%# Bind("THPREFIX_DESC") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ชื่อ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_INDV_FIRST_NAME_A" runat="server" Text='<%# Bind("INDV_FIRST_NAME") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="นามสกุล">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_INDV_LAST_NAME_A" runat="server" Text='<%# Bind("INDV_LAST_NAME") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="เลขที่บัตรประชาชน">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_UNIQUEID_A" runat="server" Text='<%# Bind("UNIQUEID") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ผลการตรวจกรอง">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_SERCH_RESULT_A" runat="server" Text='<%# Bind("SEARCH_RESULT") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ระดับความเสี่ยง">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_RISK_LEVEL_A" runat="server" Text='<%# Bind("RISK_LEVEL") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="10%" />
                                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                                            </asp:TemplateField>
                                        </Columns>
                                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                        <PagerSettings Mode="NumericFirstLast" />
                                        <PagerStyle BackColor="#FFCC66" CssClass="cssPager" ForeColor="#333333" HorizontalAlign="Center" />
                                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                                        <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                                        <AlternatingRowStyle BackColor="White" />
                                    </asp:GridView>
                                    <asp:Label ID="lblCount_GridView1" runat="server" Text="0"></asp:Label>
                                    &nbsp;รายการ</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr bgcolor="#FF9933">
                    <td colspan="5" style="text-align: left">
                        &nbsp;<asp:Label ID="lblGroupCodeName_2" runat="server" Text="รายชื่อกรรมการ"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="padding: 5px; width: 5%;" align="center" valign="middle">
                        <asp:Label ID="lblGroupCode_2" runat="server" Text="2"></asp:Label>
                    </td>
                    <td align="left" style="padding: 5px; width: 95%;" colspan="4">
                        <table width="100%">
                            <tr>
                                <td style="background-color: #FF9933; border: 0px; padding: 0px;" colspan="5">
                                    &nbsp;<asp:Label ID="lblGroupCodeSubName_21" runat="server" Text="รายชื่อกรรมการทั้งหมด"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: center; width: 5%;" rowspan="7">
                                    <asp:Label ID="lblGroupCodeSub_21" runat="server" Text="1"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    คำนำหน้าชื่อ</td>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 60%;" colspan="2">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    <asp:DropDownList ID="ddlPrefixTH_S" runat="server" AutoPostBack="true" 
                                        CssClass="control" Width="150px">
                                    </asp:DropDownList>
                                </td>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" colspan="2" style="width: 60%;">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" class="style5">
                                    ชื่อ
                                </td>
                                <td align="left" class="style5">
                                    นามสกุล
                                </td>
                                <td align="left" colspan="2" class="style6">
                                    เลขที่บัตรประชาชน
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    <asp:TextBox ID="txtINDV_FIRST_NAME_S" runat="server" CssClass="control" Height="20px"
                                        MaxLength="20" Width="150px"></asp:TextBox>
                                </td>
                                <td align="left" style="width: 20%;">
                                    <asp:TextBox ID="txtINDV_LAST_NAME_S" runat="server" CssClass="control" Height="20px"
                                        MaxLength="20" Width="150px"></asp:TextBox>
                                </td>   
                                <td align="left" style="width: 30%;">
                                    <asp:TextBox ID="txtUNIQUEID_S" runat="server" CssClass="control" Height="20px"
                                        MaxLength="13" Width="150px" onkeypress="javascript:return NumberOnly(event);"></asp:TextBox>
                                    &nbsp;
                                    </td>
                                <td align="left" style="width: 30%;">
                                    <asp:Button ID="btnSancList_S" runat="server" Text="ตรวจกรอง" />
                                    <asp:Button ID="btnAddS" runat="server" Text="เพิ่ม" Width="50px" />
                                    <asp:Button ID="btnEditS" runat="server" Text="แก้ไข" Visible="false" Width="50px" />
                                    <asp:Button ID="btnDelS" runat="server" Text="ลบ" Width="50px" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 20%;">
                                    <asp:Label ID="lblSanc_Result_S" runat="server" ForeColor="Red"></asp:Label>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:Label ID="lblRisk_Level_S" runat="server" Text="0" Visible="False" 
                                        ForeColor="Red"></asp:Label>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:HiddenField ID="hidIndexS" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" colspan="4">
                                    <asp:GridView ID="GridView21" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                        ForeColor="#333333" ShowHeaderWhenEmpty="True" Width="95%">
                                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                        <Columns>
                                            <asp:CommandField ButtonType="Image" SelectImageUrl="~/img/icon/select_icon.gif"
                                                ShowSelectButton="True">
                                                <ItemStyle HorizontalAlign="Center" Width="60px" />
                                            </asp:CommandField>
                                            <asp:TemplateField HeaderText="ลำดับ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_Seq" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                                <ItemStyle HorizontalAlign="Center" Width="5%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="รหัส" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_THPREFIX_S" runat="server" Text='<%# Bind("THPREFIX") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" />
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="คำนำหน้าชื่อ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_THPREFIX_DESC_S" runat="server" Text='<%# Bind("THPREFIX_DESC") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ชื่อ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_INDV_FIRST_NAME_S" runat="server" Text='<%# Bind("INDV_FIRST_NAME") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="นามสกุล">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_INDV_LAST_NAME_S" runat="server" Text='<%# Bind("INDV_LAST_NAME") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="เลขที่บัตรประชาชน">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_UNIQUEID_S" runat="server" Text='<%# Bind("UNIQUEID") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ผลการตรวจกรอง">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_SERCH_RESULT_S" runat="server" Text='<%# Bind("SEARCH_RESULT") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ระดับความเสี่ยง">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_RISK_LEVEL_S" runat="server" Text='<%# Bind("RISK_LEVEL") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>
                                        </Columns>
                                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                        <PagerSettings Mode="NumericFirstLast" />
                                        <PagerStyle BackColor="#FFCC66" CssClass="cssPager" ForeColor="#333333" HorizontalAlign="Center" />
                                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                                        <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                                        <AlternatingRowStyle BackColor="White" />
                                    </asp:GridView>
                                    <asp:Label ID="lblCount_GridView21" runat="server" Text="0"></asp:Label>
                                    &nbsp;รายการ</td>
                            </tr>
                        </table>
                        <table width="100%">
                            <tr>
                                <td style="background-color: #FF9933; border: 0px; padding: 0px;" colspan="5">
                                    &nbsp;<asp:Label ID="lblGroupCodeSubName_22" runat="server" Text="รายชื่อกรรมการที่ มีอำนาจลงนามผูกพันนิติบุคคล"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: center; width: 5%;" rowspan="7">
                                    <asp:Label ID="lblGroupCodeSub_22" runat="server" Text="2"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    คำนำหน้าชื่อ</td>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 60%;" colspan="2">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    <asp:DropDownList ID="ddlPrefixTH_D" runat="server" AutoPostBack="true" 
                                        CssClass="control" Width="150px">
                                    </asp:DropDownList>
                                </td>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" colspan="2" style="width: 60%;">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    ชื่อ
                                </td>
                                <td align="left" style="width: 20%;">
                                    นามสกุล
                                </td>
                                <td align="left" colspan="2" style="width: 60%;">
                                    เลขที่บัตรประชาชน
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    <asp:TextBox ID="txtINDV_FIRST_NAME_D" runat="server" CssClass="control" Height="20px"
                                        MaxLength="20" Width="150px"></asp:TextBox>
                                </td>
                                <td align="left" style="width: 20%;">
                                    <asp:TextBox ID="txtINDV_LAST_NAME_D" runat="server" CssClass="control" Height="20px"
                                        MaxLength="20" Width="150px"></asp:TextBox>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:TextBox ID="txtUNIQUEID_D" runat="server" CssClass="control" Height="20px"
                                        MaxLength="13" Width="150px" onkeypress="javascript:return NumberOnly(event);"></asp:TextBox>
                                    &nbsp;
                                    </td>
                                <td align="left" style="width: 30%;">
                                    <asp:Button ID="btnSancList_D" runat="server" Text="ตรวจกรอง" />
                                    <asp:Button ID="btnAddD" runat="server" Text="เพิ่ม" Width="50px" />
                                    <asp:Button ID="btnEditD" runat="server" Text="แก้ไข" Visible="false" Width="50px" />
                                    <asp:Button ID="btnDelD" runat="server" Text="ลบ" Width="50px" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 20%;">
                                    <asp:Label ID="lblSanc_Result_D" runat="server" ForeColor="Red"></asp:Label>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:Label ID="lblRisk_Level_D" runat="server" ForeColor="Red" Text="0" 
                                        Visible="False"></asp:Label>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:HiddenField ID="hidIndexD" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" colspan="4">
                                    <asp:GridView ID="GridView22" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                        ForeColor="#333333" ShowHeaderWhenEmpty="True" Width="95%">
                                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                        <Columns>
                                            <asp:CommandField ButtonType="Image" SelectImageUrl="~/img/icon/select_icon.gif"
                                                ShowSelectButton="True">
                                                <ItemStyle HorizontalAlign="Center" Width="60px" />
                                            </asp:CommandField>

                                            <asp:TemplateField HeaderText="ลำดับ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_Seq" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                                <ItemStyle HorizontalAlign="Center" Width="5%" />
                                            </asp:TemplateField>
                                           
                                           <asp:TemplateField HeaderText="รหัส" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_THPREFIX_D" runat="server" Text='<%# Bind("THPREFIX") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" />
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="คำนำหน้าชื่อ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_THPREFIX_DESC_D" runat="server" Text='<%# Bind("THPREFIX_DESC") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="ชื่อ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_INDV_FIRST_NAME_D" runat="server" Text='<%# Bind("INDV_FIRST_NAME") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="นามสกุล">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_INDV_LAST_NAME_D" runat="server" Text='<%# Bind("INDV_LAST_NAME") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="เลขที่บัตรประชาชน">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_UNIQUEID_D" runat="server" Text='<%# Bind("UNIQUEID") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ผลการตรวจกรอง">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_SERCH_RESULT_D" runat="server" Text='<%# Bind("SEARCH_RESULT") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ระดับความเสี่ยง">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_RISK_LEVEL_D" runat="server" Text='<%# Bind("RISK_LEVEL") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>
                                        </Columns>
                                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                        <PagerSettings Mode="NumericFirstLast" />
                                        <PagerStyle BackColor="#FFCC66" CssClass="cssPager" ForeColor="#333333" HorizontalAlign="Center" />
                                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                                        <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                                        <AlternatingRowStyle BackColor="White" />
                                    </asp:GridView>
                                    <asp:Label ID="lblCount_GridView22" runat="server" Text="0"></asp:Label>
                                    &nbsp;รายการ</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr bgcolor="#FF9933">
                    <td colspan="5" style="text-align: left">
                        &nbsp;<asp:Label ID="lblGroupCodeName_3" runat="server" Text="ผู้ถือหุ้นบุคคลธรรมดา"></asp:Label>
                    </td>
                </tr>
                <tr bgcolor="#FDF6DA">
                    <td style="padding: 5px; width: 5%;" align="center" valign="middle">
                        <asp:Label ID="lblGroupCode_3" runat="server" Text="3"></asp:Label>
                    </td>
                    <td align="left" style="padding: 5px; width: 95%;" colspan="4">
                        <table width="100%">
                            <tr>
                                <td style="background-color: #FF9933; border: 0px; padding: 0px;" colspan="5">
                                    &nbsp;<asp:Label ID="lblGroupCodeSubName_31" runat="server" Text="ผู้ถือหุ้นบุคคลธรรมดาตั้งแต่ร้อยละ 20 ขึ้นไป"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: center; width: 5%;" rowspan="7">
                                    <asp:Label ID="lblGroupCodeSub_31" runat="server" Text="1"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    คำนำหน้าชื่อ</td>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 60%;" colspan="2">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    <asp:DropDownList ID="ddlPrefixTH_F" runat="server" AutoPostBack="true" 
                                        CssClass="control" Width="150px">
                                    </asp:DropDownList>
                                </td>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" colspan="2" style="width: 60%;">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    ชื่อ
                                </td>
                                <td align="left" style="width: 20%;">
                                    นามสกุล
                                </td>
                                <td align="left" colspan="2" style="width: 60%;">
                                    เลขที่บัตรประชาชน
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    <asp:TextBox ID="txtINDV_FIRST_NAME_F" runat="server" CssClass="control" Height="20px"
                                        MaxLength="20" Width="150px"></asp:TextBox>
                                </td>
                                <td align="left" style="width: 20%;">
                                    <asp:TextBox ID="txtINDV_LAST_NAME_F" runat="server" CssClass="control" Height="20px"
                                        MaxLength="20" Width="150px"></asp:TextBox>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:TextBox ID="txtUNIQUEID_F" runat="server" CssClass="control" Height="20px"
                                        MaxLength="13" Width="150px" onkeypress="javascript:return NumberOnly(event);"></asp:TextBox>
                                    &nbsp;
                                    </td>
                                <td align="left" style="width: 30%;">
                                    <asp:Button ID="btnSancList_F" runat="server" Text="ตรวจกรอง" />
                                    <asp:Button ID="btnAddF" runat="server" Text="เพิ่ม" Width="50px" />
                                    <asp:Button ID="btnEditF" runat="server" Text="แก้ไข" Visible="false" Width="50px" />
                                    <asp:Button ID="btnDelF" runat="server" Text="ลบ" Width="50px" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 20%;">
                                    <asp:Label ID="lblSanc_Result_F" runat="server" ForeColor="Red"></asp:Label>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:Label ID="lblRisk_Level_F" runat="server" ForeColor="Red" Text="0" 
                                        Visible="False"></asp:Label>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:HiddenField ID="hidIndexF" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" colspan="4">
                                    <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                        ForeColor="#333333" ShowHeaderWhenEmpty="True" Width="95%">
                                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                        <Columns>
                                           
                                            <asp:CommandField ButtonType="Image" SelectImageUrl="~/img/icon/select_icon.gif"
                                                ShowSelectButton="True">
                                                <ItemStyle HorizontalAlign="Center" Width="60px" />
                                            </asp:CommandField>

                                            <asp:TemplateField HeaderText="ลำดับ">
                                                <ItemTemplate>
                                                    <%# Container.DataItemIndex + 1 %>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                                <ItemStyle HorizontalAlign="Center" Width="5%" />
                                            </asp:TemplateField>
                                           
                                           <asp:TemplateField HeaderText="รหัส" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_THPREFIX_F" runat="server" Text='<%# Bind("THPREFIX") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" />
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="คำนำหน้าชื่อ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_THPREFIX_DESC_F" runat="server" Text='<%# Bind("THPREFIX_DESC") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="ชื่อ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_INDV_FIRST_NAME_F" runat="server" Text='<%# Bind("INDV_FIRST_NAME") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="นามสกุล">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_INDV_LAST_NAME_F" runat="server" Text='<%# Bind("INDV_LAST_NAME") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="เลขที่บัตรประชาชน">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_UNIQUEID_F" runat="server" Text='<%# Bind("UNIQUEID") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ผลการตรวจกรอง">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_SERCH_RESULT_F" runat="server" Text='<%# Bind("SEARCH_RESULT") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ระดับความเสี่ยง">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_RISK_LEVEL_F" runat="server" Text='<%# Bind("RISK_LEVEL") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>
                                        </Columns>
                                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                        <PagerSettings Mode="NumericFirstLast" />
                                        <PagerStyle BackColor="#FFCC66" CssClass="cssPager" ForeColor="#333333" HorizontalAlign="Center" />
                                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                                        <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                                        <AlternatingRowStyle BackColor="White" />
                                    </asp:GridView>
                                    <asp:Label ID="lblCount_ShrHolder_INDV" runat="server" Text="0"></asp:Label>
                                    &nbsp;รายการ</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr bgcolor="#FF9933">
                    <td colspan="5" style="text-align: left">
                        &nbsp;<asp:Label ID="lblGroupCodeName_4" runat="server" Text="ผู้ถือหุ้นนิติบุคคล"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="padding: 5px; width: 5%;" align="center" valign="middle">
                        <asp:Label ID="lblGroupCode_4" runat="server" Text="4"></asp:Label>
                    </td>
                    <td align="left" style="padding: 5px; width: 95%;" colspan="4">
                        <table width="100%">
                            <tr>
                                <td style="background-color: #FF9933; border: 0px; padding: 0px;" colspan="4">
                                    &nbsp;<asp:Label ID="lblGroupCodeSubName_41" runat="server" Text="ผู้ถือหุ้นนิติบุคคลตั้งแต่ร้อยละ 20 ขึ้นไป"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: center; width: 5%;" rowspan="5">
                                    <asp:Label ID="lblGroupCodeSub_41" runat="server" Text="1"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 30%;">
                                    &nbsp;ชื่อนิติบุคคล</td>
                                <td align="left" style="width: 70%;" colspan="2">
                                    &nbsp;เลขทะเบียนนิติบุคคล</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 30%;">
                                    <asp:TextBox ID="txtCORP_ID_SHR_HOLDER_NAME" runat="server" CssClass="control" Height="20px"
                                        MaxLength="20" Width="80%"></asp:TextBox>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:TextBox ID="txtCORP_ID_SHR_HOLDER" runat="server" CssClass="control" 
                                        Height="20px" MaxLength="20" Width="150px"></asp:TextBox>
                                </td>
                                <td align="left" style="width: 40%;">
                                    <asp:Button ID="btnEditG" runat="server" Text="แก้ไข" Visible="false" Width="50px" />
                                    <asp:Button ID="btnAddG" runat="server" Text="เพิ่ม" Width="50px" />
                                    <asp:Button ID="btnDelG" runat="server" Text="ลบ" Width="50px" />
                                    <asp:Button ID="btnAddSub_Corp" runat="server" Text="เพิ่มโครงสร้างนิติบุคคล" Visible="false" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 30%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 30%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 40%;">
                                    <asp:HiddenField ID="hidSeqG" runat="server" />
                                    <asp:HiddenField ID="hidIndexG" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" colspan="3">
                                    <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                        ForeColor="#333333" ShowHeaderWhenEmpty="True" Width="95%">
                                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                        <Columns>
                                            
                                            <asp:CommandField ButtonType="Image" SelectImageUrl="~/img/icon/select_icon.gif"
                                                ShowSelectButton="True">
                                                <ItemStyle HorizontalAlign="Center" Width="60px" />
                                            </asp:CommandField>

                                            <asp:TemplateField HeaderText="ลำดับ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_Seq" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                                <ItemStyle HorizontalAlign="Center" Width="5%" />
                                            </asp:TemplateField>
                                            
                                            <asp:TemplateField HeaderText="ชื่อนิติบุคคล">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_CORP_ID_SHR_HOLDER_NAME" runat="server" Text='<%# Bind("CORP_ID_SHR_HOLDER_NAME") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="45%" />
                                                <ItemStyle HorizontalAlign="Center" Width="45%" />
                                            </asp:TemplateField>
                                              
                                            <asp:TemplateField HeaderText="เลขทะเบียนนิติบุคคล">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_CORP_ID_SHR_HOLDER" runat="server" Text='<%# Bind("CORP_ID_SHR_HOLDER") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="45%" />
                                                <ItemStyle HorizontalAlign="Center" Width="45%" />
                                            </asp:TemplateField>
                                          
                                        </Columns>
                                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                        <PagerSettings Mode="NumericFirstLast" />
                                        <PagerStyle BackColor="#FFCC66" CssClass="cssPager" ForeColor="#333333" HorizontalAlign="Center" />
                                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                                        <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                                        <AlternatingRowStyle BackColor="White" />
                                    </asp:GridView>
                                    <asp:Label ID="lblCount_GridView4" runat="server" Text="0"></asp:Label>
                                    &nbsp;รายการ</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr bgcolor="#FF9933">
                    <td colspan="5" style="text-align: left">
                        &nbsp;<asp:Label ID="lblGroupCodeName_5" runat="server" Text="ผู้รับมอบอำนาจให้สร้างความสัมพันธ์กับธนาคาร"></asp:Label>
                    </td>
                </tr>
                <tr bgcolor="#FDF6DA">
                    <td style="padding: 5px; width: 5%;" align="center" valign="middle">
                        <asp:Label ID="lblGroupCode_5" runat="server" Text="5"></asp:Label>
                    </td>
                    <td align="left" style="padding: 5px; width: 95%;" colspan="4">
                        <table width="100%">
                            <tr>
                                <td style="background-color: #FF9933; border: 0px; padding: 0px;" colspan="5">
                                    &nbsp;<asp:Label ID="lblGroupCodeSubName_51" runat="server" Text="ผู้รับมอบอำนาจให้สร้างความสัมพันธ์กับธนาคาร"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: center; width: 5%;" rowspan="9">
                                    <asp:Label ID="lblGroupCodeSub_51" runat="server" Text="1"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    คำนำหน้าชื่อ</td>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 60%;" colspan="2">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    <asp:DropDownList ID="ddlPrefixTH_H" runat="server" AutoPostBack="true" 
                                        CssClass="control" Width="150px">
                                    </asp:DropDownList>
                                </td>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" colspan="2" style="width: 60%;">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    ชื่อ
                                </td>
                                <td align="left" style="width: 20%;">
                                    นามสกุล
                                </td>
                                <td align="left" colspan="2" style="width: 60%;">
                                    เลขที่บัตรประชาชน
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    <asp:TextBox ID="txtINDV_FIRST_NAME_H" runat="server" CssClass="control" Height="20px"
                                        MaxLength="20" Width="150px"></asp:TextBox>
                                </td>
                                <td align="left" style="width: 20%;">
                                    <asp:TextBox ID="txtINDV_LAST_NAME_H" runat="server" CssClass="control" Height="20px"
                                        MaxLength="20" Width="150px"></asp:TextBox>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:TextBox ID="txtUNIQUEID_H" runat="server" CssClass="control" Height="20px"
                                        MaxLength="13" Width="150px" onkeypress="javascript:return NumberOnly(event);"></asp:TextBox>
                                    &nbsp;
                                    </td>
                                <td align="left" style="width: 30%;">
                                    <asp:Button ID="btnSancList_H" runat="server" Text="ตรวจกรอง" />
                                    <asp:Button ID="btnAddH" runat="server" Text="เพิ่ม" Width="50px" />
                                    <asp:Button ID="btnEditH" runat="server" Text="แก้ไข" Visible="false" Width="50px" />
                                    <asp:Button ID="btnDelH" runat="server" Text="ลบ" Width="50px" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    <asp:Label ID="Label1" runat="server" Text="ความสัมพันธ์กับนิติบุคคล"></asp:Label>
                                </td>
                                <td align="left" style="width: 20%;">
                                    <asp:Label ID="Label2" runat="server" Text="ความสมบูรณ์" Visible="False"></asp:Label>
                                </td>
                                <td align="left" style="width: 30%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 30%;">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    <asp:TextBox ID="txtINDV_CONNECTED_TO_CORP_H" runat="server" CssClass="control" 
                                        Height="20px" MaxLength="20" Width="150px"></asp:TextBox>
                                </td>
                                <td align="left" style="width: 20%;">
                                    <asp:TextBox ID="txtINDV_COMPLETED_H" runat="server" CssClass="control" 
                                        Height="20px" MaxLength="1" Width="150px" Visible="False"></asp:TextBox>
                                </td>
                                <td align="left" style="width: 30%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 30%;">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="left" style="width: 20%;">
                                    &nbsp;</td>
                                <td align="left" style="width: 20%;">
                                    <asp:Label ID="lblSanc_Result_H" runat="server" ForeColor="Red"></asp:Label>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:Label ID="lblRisk_Level_H" runat="server" Text="0" Visible="False" 
                                        ForeColor="Red"></asp:Label>
                                </td>
                                <td align="left" style="width: 30%;">
                                    <asp:HiddenField ID="hidIndexH" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" colspan="4">
                                    <asp:GridView ID="GridView5" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                        ForeColor="#333333" ShowHeaderWhenEmpty="True" Width="95%">
                                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                        <Columns>
                                            <asp:CommandField ButtonType="Image" SelectImageUrl="~/img/icon/select_icon.gif"
                                                ShowSelectButton="True">
                                                <ItemStyle HorizontalAlign="Center" Width="60px" />
                                            </asp:CommandField>
                                            <asp:TemplateField HeaderText="ลำดับ">
                                                <ItemTemplate>
                                                    <%# Container.DataItemIndex + 1 %>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                                <ItemStyle HorizontalAlign="Center" Width="5%" />
                                            </asp:TemplateField>
                                           
                                                 <asp:TemplateField HeaderText="รหัส" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_THPREFIX_H" runat="server" Text='<%# Bind("THPREFIX") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" />
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="คำนำหน้าชื่อ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_THPREFIX_DESC_H" runat="server" Text='<%# Bind("THPREFIX_DESC") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                            </asp:TemplateField>
                                           
                                            <asp:TemplateField HeaderText="ชื่อ">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_INDV_FIRST_NAME_H" runat="server" Text='<%# Bind("INDV_FIRST_NAME") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="นามสกุล">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_INDV_LAST_NAME_H" runat="server" Text='<%# Bind("INDV_LAST_NAME") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                                <ItemStyle HorizontalAlign="Center" Width="20%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="เลขที่บัตรประชาชน">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_UNIQUEID_H" runat="server" Text='<%# Bind("UNIQUEID") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="10%" />
                                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ความสัมพันธ์กับนิติบุคคล" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_CONNECTED_TO_CORP_H" runat="server" Text='<%# Bind("CONNECTED_TO_CORP") %>'></asp:Label>
                                                </ItemTemplate>    
                                                <HeaderStyle HorizontalAlign="Center" Width="10%" />
                                                <ItemStyle HorizontalAlign="Center" Width="10%" />                                        
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ความสมบรูณ์" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_F_COMPLETE_H" runat="server" Text='<%# Bind("F_COMPLETE") %>'></asp:Label>
                                                </ItemTemplate>                                  
                                                     <HeaderStyle HorizontalAlign="Center" Width="8%" />
                                                <ItemStyle HorizontalAlign="Center" Width="8%" /> 
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ผลการตรวจกรอง">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_SERCH_RESULT_H" runat="server" Text='<%# Bind("SEARCH_RESULT") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="10%" />
                                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="ระดับความเสี่ยง">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrid_RISK_LEVEL_H" runat="server" Text='<%# Bind("RISK_LEVEL") %>'></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" Width="10%" />
                                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                                            </asp:TemplateField>
                                        </Columns>
                                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                        <PagerSettings Mode="NumericFirstLast" />
                                        <PagerStyle BackColor="#FFCC66" CssClass="cssPager" ForeColor="#333333" HorizontalAlign="Center" />
                                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                                        <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                                        <AlternatingRowStyle BackColor="White" />
                                    </asp:GridView>
                                    <asp:Label ID="lblCount_GridView5" runat="server" Text="0"></asp:Label>
                                    &nbsp;รายการ</td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <hr />
            <table style="padding: 5px; width: 100%;" class="control" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td style="text-align: center">
                        <asp:Label ID="lblSave" runat="server" Text="บันทึกข้อมูลแล้ว..." Height="25px" ForeColor="Red" Visible="false"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center">
                        <asp:Button ID="btnBack" runat="server" Text="<<< ย้อนกลับ" Width="10%" Visible="false" />
                        <asp:Button ID="btnSave" runat="server" Text="บันทึก" Width="10%" />
                        <asp:Button ID="btnClose" runat="server" Text="ปิด" Width="10%" />
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center">
                        <asp:Label ID="lblMsg" runat="server" CssClass="control" Font-Bold="True" ForeColor="Red"
                            Text="ไม่พบข้อมูล" Visible="False" Font-Size="X-Large" Height="30px"></asp:Label>
                        <span id="Processing" style="display: none">
                            <img src="../img/icon/ajax-loader.gif" alt="Please wait" />
                            กรุณารอสักครู่ ระบบกำลังค้นหาข้อมูล... </span>
                        <span id="Saving" style="display: none">
                            <img src="../img/icon/ajax-loader.gif" alt="Please wait" />
                            กรุณารอสักครู่ ระบบกำลังบันทึกข้อมูล... </span>
                    </td>
                </tr>
            </table>
            <asp:HiddenField ID="hidCUSTSEQ" runat="server" />
            <asp:HiddenField ID="hidCUSTTYPE" runat="server" />
            <asp:HiddenField ID="hidHaveEdit" runat="server" Value="0" />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
